import { createContext, Dispatch, SetStateAction } from 'react';
import type { TMetadata } from '@/types';
import type {
  IChildReply,
  IComment,
  IParentReply,
  IPost,
  IReply,
} from '@/interfaces';

export const ReplyAdminContext = createContext<{
  metadata?: TMetadata | null;
  detailItem?: IPost | null;
  commentItem?: IComment | null;
  setCommentItem?: Dispatch<SetStateAction<IComment | undefined>> | null;
  replyItem?: IReply | null;
  setReplyItem?: Dispatch<SetStateAction<IReply | undefined>> | null;
  parentReplyItem?: IParentReply | null;
  setParentReplyItem?: Dispatch<
    SetStateAction<IParentReply | undefined>
  > | null;
  childReplyItem?: IChildReply | null;
  setChildReplyItem?: Dispatch<SetStateAction<IChildReply | undefined>> | null;
}>({});
